import App from './App'
import Vue from 'vue'
import './uni.promisify.adaptor'
import uView from 'uview-ui';
String.prototype.gblen = function () {
    var len = 0;
    for (var i = 0; i < this.length; i++) {
        if (this.charCodeAt(i) > 127 || this.charCodeAt(i) == 94) {
            len += 2;
        } else {
            len++;
        }
    }
    return len;
};
Vue.use(uView);
/*****************************************************/
import BgMusic from './components/bg-music.vue'
Vue.component('BgMusic', BgMusic);

import ActivityEnd from './components/activityEnd.vue'
Vue.component('ActivityEnd', ActivityEnd);

import NewRule from './components/new-rule.vue'
Vue.component('NewRule', NewRule);
const mixed = {
	data() {
		return {
			imgPath: process.env.NODE_ENV != 'production'?'':'https://v-test.wufae.com/LS/2024mbti'
		}
	}
}
Vue.mixin(mixed);
Vue.directive('showFive', {
	inserted: function (el, binding) {
		console.log(el)
			setTimeout(()=> {
				 el.parentNode && el.parentNode.removeChild(el)
			}, 5000)
	  },
})

/*******************************************************/
/*******************执行登录初始化***************************/
// import platform from "./src/platform";
// platform.init();
/****************************************/
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
  ...App
})
app.$mount()

// #ifdef H5
   window.painter = app;
// #endif

